// 拟合公式
<template>
  <div class="tableAuto">
    <el-table :data="tableData" style="width:100%" :height="height" @row-click="rowClick" border stripe cell-class-name="custum-cell"
      :header-cell-style="{background:'#EAEBEC'}" v-loading="tableLoading" ref="refTable" highlight-current-row @sort-change='sortChange'>
      <el-table-column prop="mxbds" min-width="160" show-overflow-tooltip :label="$t('model.nihe_moxingbiaodashi')"></el-table-column>
      <el-table-column prop="mbx" width="160" show-overflow-tooltip :label="$t('model.target_col')">
      </el-table-column>
      <el-table-column prop="yhsd" width="120" show-overflow-tooltip :label="$t('model.optimize_set')">
      </el-table-column>

    </el-table>
  </div>
</template>
<script>
export default {
  data () {
    return {
      radioId: "",
      height: document.body.offsetHeight - 210,
      wrList: [{
        label: "读写",
        value: 0
      }, {
        label: "只读",
        value: 1
      }, {
        label: "只写",
        value: 2
      }],

      tableData: [
        { 'mxbds': '3-0.106722*温度+0.038226*喂料量*振动频率-3.3861129*喂料量*风速 ', 'mbx': '水分含量', 'yhsd': '最小值' }
      ],
    }
  },
  props: {
    // tableData: Array,
    pager: Object,
    tableLoading: Boolean
  },
  methods: {
    rowClick (row) {
      this.radioId = row.woId;
      let obj = {
        row: row,
        radioId: this.radioId,
      }
      this.$emit("handleEdit", obj)
      this.$refs.refTable.setCurrentRow(row);
    },
    sortChange (column) {
      this.$emit('sortChange', column)
    },
    table_index (index) {
      return (this.pager.pageNum - 1) * this.pager.pageSize + index
    },
    getwrName (id) {
      if (!id && id !== 0) return ''
      return this.wrList.find(item => parseInt(item.value) == id).label
    },

  }
}
</script>
<style scoped>
.bai {
  color: #fff;
}

.tableAuto {
  margin-top: 10px;
}
</style>
<style>
.custum-cell .cell {
  font-size: 16px;
}
</style>